home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
geos-archive
/
GEOS-D64
/
GeoThek Programme (19xx)(-)(de)[gt106b].d64
/
file-master
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
9KB
|
343 lines
20 REM FILEMASTER MANFRED TORNSDORF
30 PRINTCHR$(14)
40 FOR I=0 TO 7:READ SP% (I):NEXTI
60 PRINT"[147]"
80 V=53248:POKEV+21,0
100 PRINT"[147][208]LEASE INSERT DISKETTE & PRESS A KEY."
120 GETA$:IFA$=""THEN120
140 OPEN5,8,15,"I"
160 OPEN3,8,3,"#0"
180 PRINT"[147]"
200 PRINT"[198][201][204][197]-[205][193][211][212][197][210]"
220 PRINT"-------------"
240 PRINT"[195]ONVERT [198]ILES INTO [199][197][207][211] FORMAT."
260 PRINT""
280 PRINT"[196]ISK DIRECTORY = DIR"
300 PRINT"[204]OAD SPRITE = SPL"
320 PRINT"[195]REATE SPRITE = CSP"
340 PRINT"[210]EAD FILE = RFL"
380 PRINT"[196]ISPLAY FILE INFO = FDI"
400 PRINT"[195]REATE [199][197][207][211] FILE = GEOS"
420 PRINT"[201]NPUT/CHANGE DATE = DATE"
440 PRINT"[195]HANGE DISKETTES = DISK"
460 PRINT"[197]ND PROGRAM = END"
480 PRINT"[210]EAD INFO = INFO"
500 N$="XXXXXXX"
520 INPUT"[217]OUR CHOICE";N$
540 IF N$="DIR" THEN GOSUB 4060
560 IF N$="SPL" THEN GOSUB 4060
580 IF N$="CSP" THEN GOSUB 2320
600 IF N$="RFL" THEN GOSUB 800
620 IF N$="DATE" THEN GOSUB 3160
640 IF N$="FDI" ANDZ1=1 THEN PRINT"[147]":GOSUB 980
660 IF N$="INFO" THEN GOSUB 5100
680 IF N$="DISK" THEN CLOSE3:CLOSE5:GOTO100
700 IF N$="END" THEN 760
720 IF N$="GEOS" THEN GOSUB 3540
740 GOTO 180
760 CLOSE3:CLOSE5:POKEV+21,0:STOP
780 STOP:REM**********************
800 Z1=0:GOSUB 1380 :IF T=0 OR Z1=0 THEN RETURN
820 AT=T: REM DIR-TRACK FOUND
840 AS=S: REM DIR SECTOR FOUND
860 AB=BP:REM BUFFER POINTER FILETYPE
880 TF=TS:SF=SS:REM TRACK FILE,SECTOR FILE
900 FI$=NA$ :
920 GOSUB2220:FS=A:GOSUB2220:GT=A:GOSUB2220:JA=A:JA$=STR$(A)
930 GOSUB2220:MO=A:MO$=STR$(A)
940 GOSUB2220:TA=A:TA$=STR$(A):GOSUB2220:HO=A:HO$=STR$(A)
950 GOSUB2220:MI=A:MI$=STR$(A)
960 GOSUB2220:LL=A:GOSUB2220:LH=A:
980 PRINT"[145][145]";FI$;""
1000 PRINT"STARTING TRACK :";TF
1020 PRINT"STARTING SECTOR :";SF
1040 PRINT
1060 PRINT"FILE TYPE :";FT
1080 PRINT"INFO TRACK :";IT
1100 PRINT"INFO SECTOR :";IS
1120 PRINT#5,"B-P:";3;BP+21
1140 PRINT"FILE STRUCTURE :";FS
1160 PRINT"GEOS F-TYPE :";GT;
1180 IF GT=1 THEN PRINT" =[194]ASIC"
1200 IF GT=2 THEN PRINT" =[193]SSEMBLER"
1220 IF GT<>1 AND GT<>2 THEN PRINT
1240 PRINT"[217]EAR :";JA
1260 PRINT"[205]ONTH :";MO
1280 PRINT"[196]AY :";TA
1300 PRINT"[200]OUR :";HO
1320 PRINT"[205]INUTE :";MI
1340 PRINT"FILE LENGTH :";LL+256*LH
1360 INPUT "<[210][197][212][213][210][206]> TO GO ON";X$:RETURN
1380 REM ****************************
1400 PRINT"[147]":T=18:S=1:
1420 INPUT"[206]AME TO SEARCH FOR:";SU$
1440 SU=LEN(SU$)
1460 PRINT"[147]"
1480 SV$="":FORI=1TOSU: SV=ASC(MID$(SU$,I,1 )):IF SV>192 ANDSV<219 THEN SV=SV-96
1500 SV$=SV$+CHR$(SV):NEXTI:
1520 PRINT#5,"B-R:"3;0;T ;S
1540 PRINT#5,"B-P:"3,0
1560 BP=2
1580 GOSUB 2220
1600 TN$=A$:TN=ASC(TN$)
1620 GOSUB 2220
1640 NA$=""
1660 SN$=A$:SN=ASC(SN$):IFN$<>"I"THEN PRINT"T=";T;" S=";S
1680 PRINT#5,"B-P:";3;2
1700 FOR J=1 TO 8
1720 PRINT#5,"B-P:";3;BP
1740 GOSUB 2220:FT$=A$:FT=ASC(FT$)AND 63
1760 GOSUB 2220:TS$=A$:TS=ASC(TS$)
1780 GOSUB 2220:SS$=A$:SS=ASC(SS$)
1800 FOR I=1 TO 16:GOSUB2220
1820 IF ASC(A$)=160 THEN I=16:GOTO 1860
1840 NA$=NA$+A$:
1860 NEXTI:
1880 PRINT#5,"B-P:";3;BP+19
1900 GOSUB2220:IT$=A$:IT=ASC(IT$):
1920 GOSUB2220:IS$=A$:IS=ASC(IS$):
1940 IF FT=0 THEN 2080
1980 PRINT" ";FT;" ";TS;" ";SS;" ";CHR$(34);NA$;CHR$(34);
2000 PRINT" ";IT;" ";IS
2020 IF N$="I" THEN 2080
2040 IF SU$=MID$(NA$,1,SU) THEN PRINT"FOUND.":Z1=1:RETURN
2060 IF SV$=MID$(NA$,1,SU) THEN PRINT"FOUND":Z1=1:RETURN
2080 NA$="":
2100 IF PEEK(203)<>64 THEN 2180
2120 BP=BP+32
2140 NEXTJ
2160 IF TN<>0 THEN PRINT"":T=TN:S=SN:GOTO1520
2180 RETURN
2200 REM**************
2220 GET#3,A$:IFA$=""THENA$=CHR$(0)
2240 A=ASC(A$)
2260 RETURN
2280 REM**********************
2300 FORK=0TO62:POKE832+K,0:NEXTK
2320 PRINT"[147][211]PRITEMASTER"
2360 X1=0 :Y1=0:X=X1:Y=Y1:PS=43
2380 VX=0:VY=0:VT=0 :
2400 POKE2040,13:POKEV+21,1:POKEV,30:POKEV+1,200
2420 FOR J=X1+14 TO X1+23+14
2440 FOR I=Y1+1 TO Y1+21
2460 P=1024+I*40+J
2480 GOSUB 3000:VA%=VI%ANDVN%
2500 IF VA% <>0 THEN PS=42
2520 IF VA% = 0 THEN PS=46
2540 IF P>1024 AND P<2023 THEN POKEP,PS
2560 Y=Y+1:NEXT I : Y=0
2580 X=X+1:NEXTJ:X=0
2600 PS=43
2620 P=1024+(Y+1)*40+X+14
2640 PR=PEEK(P)
2660 IFP>1023ANDP<2024 THEN POKEP,PS
2680 GETA$:IFA$=""THEN2680
2700 IF A$=""ANDX<23 THENX=X+1
2720 IF A$="[157]"ANDX>0 THENX=X-1
2740 IF A$=""ANDY<20 THENY=Y+1
2760 IF A$="[145]"ANDY>0 THENY=Y-1
2780 IF A$="*" THEN PR=42:
2800 IF A$=" " THEN PR=46:
2820 IF A$="E" THEN 3120
2840 IF A$="[147]" THEN 2300
2860 POKEP,PR
2880 IF A$<>"*"ANDA$<>" "THEN2620
2900 GOSUB 3000
2920 IF A$="*" THEN POKEVB%,VI% OR VN%
2940 IFA$=" " THEN POKEVB%,VI%ANDSP%(VT%)
2960 GOTO 2620
2980 REM*****************
3000 VY%=Y :VX%=INT((X)/8):VT%=X-VX%*8
3020 VB%=832+VX%+VY%*3 :REM BYTE NUMBER
3040 VI%=PEEK(VB%) :REM CONTENTS
3060 VN%=2^(7-VT%) :REM NEW BIT
3080 RETURN
3100 REM *******************
3120 POKEV+21,0:PRINT"[147]":RETURN
3140 REM ****** SET DATE ***
3160 PRINT"[147]---------[196] [193] [212] [197]------------
3180 [153]"";MO$;"/";TA$;"/19";JA$;" ";HO$;":";MI$;" O'CLOCK"
3200 [143] PRINT"";TA;
3220 [153]""
3240 [153]"(null)EAR :";JA
3260 [153]"(null)ONTH :";MO
3280 [153]"STR$AY :";TA
3300 [153]"LEFT$OUR :";HO
3320 [153]"(null)INUTE :";MI
3340 [153]"LENHANGE - TYPE FIRST TWO CHARACTERS OF CHOICE ((null)VAL (null)(null),ETC.)
3360 PRINT"[196]ONE - TYPE [197][206][196]
3380 [133] "(null)OUR CHOICE";X$
3400 [139] X$[178]"END" [167] [142]
3420 [139] X$[178]"YE" [167] [133]"(null)EAR :";JA$:JA[178][197](JA$):[137]3160
3440 [139] X$[178]"MO" [167] [133]"(null)ONTH :";MO$:MO[178][197](MO$):[137]3160
3460 [139] X$[178]"DA" [167] [133]"STR$AY :";TA$:TA[178][197](TA$):[137]3160
3480 [139] X$[178]"HO" [167] [133]"LEFT$OUR :";HO$:HO[178][197](HO$):[137]3160
3500 [139] X$[178]"MI" [167] [133]"(null)INUTE :";MI$:MI[178][197](MI$):[137]3160
3520 [137] 3160
3540 [153]"LOAD":[143] *****GEOS FILE SET****
3560 [139] IT[179][177]0 [167] 3660 :[143] SHOULD BE SET
3580 IT[178]TF:IS[178]SF:[153]IT,IS
3600 [152]5,"B-A:"0;IT;IS
3620 [132]5,A,B$,C,D:[153]A,B$,C,D:
3640 [139] C[179][177] 0 [167] IT[178]C:IS[178]D:[137] 3600
3660 [153]"(null)LEASE INPUT CHR$VAL(null)(null) FILETYPE:"
3680 [133]"PEEKASIC=1 (null)/(null)=2 ATNCC.=5 ATNPPL.=6";X$:X[178][197](X$)
3700 [139] X[179]1 [175] X[177]6 [167] 3660
3720 FS[178]0:GT[178]X
3740 [152]5,"B-F:"0;IT;IS
3760 [152]5,"B-R:";3;0;AT;AS
3780 [152]5,"B-P:"3,AB[170]19
3800 [152]3,[199](IT);
3820 [152]3,[199](IS);
3840 [152]3,[199](FS);
3860 [152]3,[199](GT);
3880 [152]3,[199](JA);
3900 [152]3,[199](MO);
3920 [152]3,[199](TA);
3940 [152]3,[199](HO);
3960 [152]3,[199](MI);
3970 [139] AT[179]1 [176] AT[177]35 [167] [153]"VAL(null)(null)(null)(null):RIGHT$LLEGAL TRACK":[137]4040
3980 [152]5,"M-W:"[199](6)[199](0)[199](2)[199](AT)[199](AS)
4000 [152]5,"M-W"[199](0)[199](0)[199](1)[199](144)
4020 [153]"WRITTEN":
4040 [133] "<(null)VAL(null)(null)(null)(null)> TO CONTINUE";X$:[142]
4060 [143] ***LOOK FOR DIR & SPRITE***
4080 [153]"LOAD":T[178]18:S[178]1:[139]N$[178]"DIR"[167] 4200
4100 [133]"(null)AME TO SEARCH FOR:";SU$
4120 SU[178][195](SU$)
4140 [153]"LOAD"
4160 SV$[178]"":[129]I[178]1[164]SU:SV[178][198]([202](SU$,I,1 )):[139] SV[177]192[175]SV[179]219[167] SV[178]SV[171]96
4180 SV$[178]SV$[170][199](SV):[130]I:
4200 [152]5,"B-R:"3;0;T ;S
4220 [152]5,"B-P:"3,0
4240 BP[178]2
4260 [141] 2220
4280 TN$[178]A$:TN[178][198](TN$)
4300 [141] 2220
4320 NA$[178]""
4340 SN$[178]A$:SN[178][198](SN$):[139]N$[179][177]"DIR"[167] [153]"T=";T;" S=";S
4360 [152]5,"B-P:";3;2
4380 [129] J[178]1 [164] 8
4400 [152]5,"B-P:";3;BP
4420 [141] 2220:F1$[178]A$:F1[178][198](F1$)[175] 63
4440 [141] 2220:
4460 [141] 2220:
4480 [129] I[178]1 [164] 16:[141]2220
4500 [139] [198](A$)[178]160 [167] I[178]16:[137] 4540
4520 NA$[178]NA$[170]A$:
4540 [130]I:
4560 [152]5,"B-P:";3;BP[170]19
4580 [141]2220:I1$[178]A$:I1[178][198](I1$):
4600 [141]2220:I2$[178]A$:I2[178][198](I2$):
4620 [139] F1[178]0 [167] 4740
4640 [139] N$[178]"DIR" [167] [153]"";NA$:[137]4740
4660 [153]" "; [199](34);NA$;[199](34)
4680 [139] N$[178]"DIR" [167] 4740
4700 [139] SU$[178][202](NA$,1,SU) [167] [153]"ASCOUND":[137] 4900
4720 [139] SV$[178][202](NA$,1,SU) [167] [153]"ASCOUND":[137] 4900
4740 NA$[178]""
4760 [139] [194](203)[179][177]64 [167] 4860
4780 BP[178]BP[170]32
4800 [130]J
4820 [139] TN[179][177]0 [167] [153]"":T[178]TN:S[178]SN:[137]4200
4840 [139] N$[179][177]"DIR"[167] [153]"(null)ORRY, NOT FOUND."
4860 [133]"<(null)VAL(null)(null)(null)(null)> TO CONTINUE";X$:[142]
4900 [143] *** READ SPRITE***
4920 [153]"LOAD(null)EAD SPRITEON"
4940 [139] I1[178]0 [167] [153]"LOADSPRITE NOT YET DEFINED":[129]ZZ[178]1[164] 1000:[130]:[137]5080
4960 [152]5,"B-R:"3;0;I1 ;I2
4980 [152]5,"B-P:"3,5
5000 [129] I[178]0 [164] 62
5020 [141] 2220
5040 [151]832[170]I,A:[153]I,A;""
5060 [130]I:
5080 [142]
5100 [143]***READ INFO SCREEN*****
5120 [139] IT[178]0 [167] [142]:[143] TRACK=0
5140 [152]5,"B-R:"3;0;IT;IS
5160 [152]5,"B-P:"3,0
5180 [129]I[178]1[164]6:A$(I,2)[178]"":[130]I
5200 [141]2220:[139]A[179][177] 0 [167] 5600
5205 [141]2220:[139]A[179][177]255 [167] 5600
5210 [141]2220:[139]A[179][177] 3 [167] 5600
5215 [141]2220:[139]A[179][177]21 [167] 5600
5220 [152]5,"B-P:"3,71
5240 [141] 2220:X[178]A
5260 [141] 2220:X[178]X[170]256[172]A
5280 A$(1,2)[178][196](X)
5300 [141] 2220:X[178]A
5320 [141] 2220:X[178]X[170]256[172]A
5340 A$(2,2)[178][196](X)
5360 [141] 2220:X[178]A
5380 [141] 2220:X[178]X[170]256[172]A
5400 A$(3,2)[178][196](X)
5420 [141] 2220:[139]A[178]0 [167] 5460
5440 A$(4,2)[178]A$(4,2)[170]A$:[137] 5420
5460 [152]5,"B-P:"3,97
5480 [141] 2220:[139]A[178]0 [167] 5520
5500 A$(5,2)[178]A$(5,2)[170]A$:[137] 5480
5520 [152]5,"B-P:"3,160
5540 [141] 2220:[139]A[178]0 [167] 5580
5560 A$(6,2)[178]A$(6,2)[170]A$:[137] 5540
5580 [143]
5600 [143] **** CREATE INFO SCREEN ******
5620 A$(1,1)[178]"1 (null)OAD ADDRESS : "
5640 A$(2,1)[178]"2 VALND ADDRESS : "
5660 A$(3,1)[178]"3 VALNTRY POINT : "
5680 A$(4,1)[178]"4 LENLASS : "
5700 A$(5,1)[178]"5 ATNUTHOR'S NAME : "
5720 A$(6,1)[178]"6 LEFT$ELP SCREEN : "
5740 [143]******************************
5760 [153]"LOADLENREATE RIGHT$NFO (null)CREEN"
5780 [129] I [178]1 [164] 6:[153]A$(I,1);A$(I,2):[130]I
5800 [133]"RIGHT$NPUT NUMBER OR VAL TO END ";X$
5820 [139] X$[178]"E" [167] [153]"LOAD":[137]6000
5840 [139] [197](X$)[179]1 [176] [197](X$)[177]6[167]5760
5860 [153]"";A$([197](X$),1);" ";A$([197](X$),2)
5880 [153][163]21);"ON";
5900 [139] [195](A$([197](X$),2))[177]19 [167][153]"ON";
5920 [133] A$([197](X$),2)
5940 [137] 5760
5960 [143]
5980 [143]
6000 [152]5,"B-P:"3,0
6020 [152]3,[199](0);[199](255);[199](3);[199](21);[199](191);
6040 [129] I[178]0 [164] 62
6060 [152]3,[199]([194](832[170]I));
6080 [130]I
6100 [152]3,[199](FT[170]128);
6120 [152]3,[199](GT);
6140 [152]3,[199](FS);
6160 [139] GT[178]1 [167] [137] 6340
6180 [143] X$=A$(1,2):GOSUB6720
6200 [143] PRINT#3,CHR$(X2);CHR$(X1);
6220 X$[178]A$(1,2):[141]6720
6240 [152]3,[199](X2);[199](X1);
6260 X$[178]A$(2,2):[141]6720
6280 [152]3,[199](X2);[199](X1);
6300 X$[178]A$(3,2):[141]6720
6320 [152]3,[199](X2);[199](X1);
6340 X[178][195](A$(4,2)):[139] X[177]19 [167] X[178]19
6360 [152]5,"B-P:"3,77
6380 [129] I[178]1 [164] X:X$[178][202](A$(4,2),I,1):[152]3,X$;
6400 [130]I :[152]3,[199](0);
6420 X[178][195](A$(5,2)):[139] X[177]19 [167] X[178]19
6440 [152]5,"B-P:"3,97
6460 [129] I[178]1 [164] X:X$[178][202](A$(5,2),I,1):[152]3,X$;
6480 [130]I :[152]3,[199](0);
6500 X[178][195](A$(6,2)):[139] X[177]40 [167] X[178]40
6520 [152]5,"B-P:"3,160
6540 [129] I[178]1 [164] X:X$[178][202](A$(6,2),I,1):[152]3,X$;
6560 [130]I :[152]3,[199](0);
6570 [139] IT[179]1 [176] IT[177]53 [167] [153]" ASCALSE TRACK":[137]6680
6580 [152]5,"M-W:"[199](6)[199](0)[199](2)[199](IT)[199](IS)
6600 [152]5,"M-W"[199](0)[199](0)[199](1)[199](144)
6620 [153]"(null)RITTEN":
6640 [152]5,"B-A:"0;IT;IS
6660 [132]5,A,B$,C,D:[153]A,B$,C,D:
6680 [133]"<(null)VAL(null)(null)(null)(null)> TO CONTINUE";X$
6700 [142]
6720 X[178][197](X$):X1[178][181](X[173]256):X2[178][181](X[171]X1[172]256 )
6740 [142]
6760 [131]127,191,223,239,247,251,253,254